package common.controls.MyFriends
{
	import common.controls.item.events.ItemDataEvent;

	import flash.events.Event;
	import flash.events.EventDispatcher;

	public class FriendsManager extends EventDispatcher
	{
		private static var _ins:FriendsManager;

		private var _dataList:Vector.<FriendsVo>; //

		private var CountList:Vector.<FriendsVo>; //保存当前的好友列表,判断是否有更变

		public function FriendsManager()
		{
			_dataList=new Vector.<FriendsVo>();
		}

		public function set dataList(value:Vector.<FriendsVo>):void
		{
			_dataList=value;
			if (CountList != _dataList)
			{
				CountList=_dataList;
				dispatchEvent(new Event(UpdateFriendsEvent.FRIENDS_ITEM_UPDATE));
			}
		}

		public function get dataList():Vector.<FriendsVo>
		{
			return _dataList;
		}

		public static function get instance():FriendsManager
		{
			if (_ins == null)
			{
				_ins=new FriendsManager();
			}
			return _ins;
		}
	}
}
